package com.itheima.consumer.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class FanoutExchangeListener {

    @RabbitListener(queues = "fanout.queue1")
    public void listenerFanoutQueue1Message(String message){
        System.out.println("队列1接收到的消息是"+message);
    }

    @RabbitListener(queues = "fanout.queue2")
    public void listenerFanoutQueue2Message(String message){
        System.out.println("队列2接收到的消息是"+message);
    }
}
